<!--
 * @Descripttion:
 * @Version: 1.0
 * @Author: 何志龙
 * @Date: 2023-11-01 11:42:18
 * @LastEditors: 何志龙
 * @LastEditTime: 2023-11-30 10:04:59
-->
<!-- 浙政钉村预审环节v2 -->
<template>
  <div class="ceshi">
    <div class="CUNYUSHEN">
      <inputSelect :isShowCity="isShowCity" :contentDataCity="contentDataCity" :contentData.sync="contentData" :JFData.sync="JFData" :title="'申请户主信息'" @getValues="getValues" />
      <bigData />
      <inputContatiner
        :SaveDataGuid="'414a1c12-1f2c-4b15-8440-6b03a4c2ff48'"
        :mainrowGuid="rowData.ROW_GUID"
        :ROW_GUID="'414a1c12-1f2c-4b15-8440-6b03a4c2ff48'"
        :data11.sync="content"
        :thList="thList"
        :Isshowbutton="Isshowbutton1" />
      <!-- //button 展示宅基地处数 -->
      <div v-if="DUIBI.length > 0" style="display: flex; justify-content: space-around; align-items: center; height: 45px">
        <div v-for="(item, index) in DUIBI" :key="index">
          <van-button type="info" size="small" @click="clickButton(item)">{{ item }}</van-button>
        </div>
      </div>
      <inputSelect :isShowCity="false" :contentData.sync="xianZhaijiDi" :JFData.sync="JFData" :title="'现宅基地及农房情况'" @getValues="getValues" @getButtons="getButton1" />
      <tableAdd
        :title="'一次性告知书'"
        :ISBianji="true"
        v-if="isshowsss"
        :button1="['新增', '删除']"
        :rowData="rowData"
        :JFData="tableAdds"
        :contentData1="contentData1"
        :contentData="contentData2"
        :dataguid="'931ab04a-f02b-4e06-b4f2-885ba55c4ed9'" />
      <inputSelect :isShowCity="false" :contentData.sync="jianfangQK" :JFData.sync="JFData" :title="'拟批准宅基地及建房情况'" @getValues="getValues" />
      <van-collapse v-model="activeNames1">
        <p class="subTitle"><span class="line"></span> <span style="color: #3f8ffc">附件</span></p>
        <van-collapse-item :title="'附件'" name="1">
          <upLoad :rowData="rowData" :FJData="FJData1" :isReadOnly="true" :SHITUID="'98bcf528966e48ce896a8b3fd02d45d5'" :UpLoadID="'7a3fc061c866434b8475d3775c9ddcea'" />
        </van-collapse-item>
      </van-collapse>
      <div>
        <p class="subTitle"><span class="line"></span> <span style="color: #3f8ffc">村集体经济组织、村民委员会意见</span></p>
        <p style="margin-top: 4px; font-size: 16px"><span style="color: #ff0000">*</span>村集体经济组织、村民委员会意见</p>
        <van-field v-model="JFData[0].CJTYJ" type="textarea" label :border="false" disable-default-padding style="background-color: #e4e4e4; margin-top: 8px; min-height: 140px" />
        <p style="text-align: right; line-height: 20px; font-size: 16px; color: black">
          <span style="padding-top: 4px">{{ JFData[0].CJTQM }}：</span> <span>{{ JFData[0].CJTSJ }}</span>
        </p>
      </div>
    </div>
    <div class="footer">
      <van-button style="width: 30vw" size="small" type="info" @click="saveData">保存</van-button>
      <van-button style="width: 30vw" size="small" type="info" @click="handleSelect">提交</van-button>
      <van-button style="width: 30vw" size="small" type="info">退回</van-button>
    </div>
    <div v-if="show11">
      <van-action-sheet v-model="show11" :title="show11Title" style="height: 70%">
        <div class="content">
          <inputSelect :isShowCity="false" :contentData.sync="show11Data1" :JFData.sync="show11Data" :title="''" @getValues="getValues" />
          <div style="display: flex; justify-content: center; align-items: center">
            <van-button style="width: 80vw; margin: 20px 0" type="info" @click="saveDataTable">保存</van-button>
          </div>
        </div>
      </van-action-sheet>
    </div>
    <van-action-sheet v-model="showTable" title="关联危改业务">
      <div class="content">
        <el-table size="small" :data="WGData" border style="width: 100%" @selection-change="handleSelectionChange111">
          <el-table-column type="selection" width="30"> </el-table-column>
          <el-table-column v-for="(it, in1) in contentDataTbale" :key="in1" :prop="it.key" :label="it.label" align="center">
            <!-- <template slot-scope="scope"> -->
            <!-- 处理枚举数据 -->
            <!-- <span v-if="it.key === 'YJFYJ'">{{ scope.row.YJFYJ == '5' ? '是' : '否' }}</span>
              <span v-else>{{ scope.row[it.key] }}</span> -->
            <!-- </template> -->
          </el-table-column>
        </el-table>
        <div style="display: flex; justify-content: center; align-items: center">
          <van-button style="width: 80vw; margin: 20px 0" type="info">确定</van-button>
        </div>
      </div>
    </van-action-sheet>
    <sendPublic :rowData="rowData" :JFData="JFData" :isshow.sync="isshow111" :handleSelectClose="handleSelectClose" />
  </div>
</template>

<script>
import bigData from '../public/bigData'
import inputContatiner from '../public/inputContatiner'
import inputSelect from '../public/inputSelect'
// import SelectCity from '../public/SelectCity.vue'
import upLoad from '@/utils/upLoad'
import { v4 as uuidv4 } from 'uuid'
import tableAdd from '../public/tableAdd'
import { GSA_Add, GSA_Search } from '@/common/commonApi'
import { getApplyPersonInfoByIdCard, farmhouseNumberApply, getxjnfGethy, dataTransFilePreview, GetFileData } from '@/utils/api'
export default {
  data() {
    return {
      thList: [
        {
          title: '姓名',
          isSort: false, // 是否进行排序, // 是否单独显示背景颜色
          sortField: 'FAMILYNAME', // 排序字段
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '与户主关系',
          isSort: false,
          sortField: 'HOUSERELATIONSHIP',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '20'
        },
        {
          title: '身份证',
          isSort: false,
          sortField: 'FAMILYIDCARD',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '20'
        },
        {
          title: '性别',
          isSort: false,
          sortField: 'FAMILYSEX',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '年龄',
          isSort: false,
          sortField: 'FAMILYAGE',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '户口所在地',
          isSort: false,
          sortField: 'HZSZD',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '是否村集体股东',
          isSort: false,
          sortField: 'IF_CJTGD',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '婚姻状况',
          isSort: false,
          sortField: 'HYZK',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '是否有不动产',
          isSort: false,
          sortField: 'IF_BDC',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },

        {
          title: '不动产编号',
          isSort: false,
          sortField: 'BDCBH',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '是否机关事业单位',
          isSort: false,
          sortField: 'IF_JGSYDW',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '火化时间',
          isSort: false,
          sortField: 'CREMATIONTIME',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        },
        {
          title: '死亡时间',
          isSort: false,
          sortField: 'DEATHTIME',
          backgroundColor: 'rgb(242, 245, 247)',
          width: '10'
        }
      ],
      isshow111: false,
      isshowsss: false,
      tableAdds: [
        {
          ROW_GUID: '',
          TO_ROW_GUID: null,
          CREATIONTIME: null,
          UPDATETIME: null,
          CLMC: null,
          FS: '',
          FSID: null,
          BZ: '',
          FILENAME: null,
          FILEID: null,
          OPTYPE: 2,
          YJFYJ: []
        }
      ],
      contentData1: [
        {
          label: '材料名称',
          key: 'CLMC' //绑定的字段
        },
        {
          label: '原件/复印件',
          key: 'YJFYJ'
        },
        {
          label: '份数',
          key: 'FS'
        },
        {
          label: '备注',
          key: 'BZ'
        }
      ],
      contentData2: [
        {
          label: '材料名称',
          key: 'CLMC', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '原件/复印件',
          key: 'YJFYJ', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '份数',
          key: 'FS',
          required: true,
          ISinput: true,
          readonly: true,
          isTime: false
        },
        {
          label: '备注',
          key: 'BZ',
          required: true,
          ISinput: true,
          readonly: true,
          isTime: false
        }
      ],
      WGData: [],
      show11: false,
      contentDataTbale: [
        {
          label: '自建房编号',
          key: 'checkNumber'
        },
        {
          label: '户主姓名',
          key: 'propertyPerson'
        },
        {
          label: '身份证号',
          key: 'householderIdcard'
        },
        {
          label: '联系电话',
          key: 'householderPhone'
        },
        {
          label: '所属市',
          key: 'belongCity'
        },
        {
          label: '所属区县',
          key: 'belongCountry'
        },
        {
          label: '所属乡镇',
          key: 'belongTown'
        },
        {
          label: '所属村',
          key: 'belongVillage'
        },
        {
          label: '房屋地址',
          key: 'detailAddress'
        },
        {
          label: '是否是无房户',
          key: 'isHasHouse'
        },
        {
          label: '治理方式',
          key: 'reportType'
        },
        {
          label: '解决方式',
          key: 'appraiseType'
        }
      ],
      show11Title: '',
      handleSelectionChange111: [],
      show11Data1: [
        {
          label: '宅基地处数',
          key: 'ZJDCS',
          ISinput: false,
          required: true,
          readonly: false,
          isTime: false,
          emitData: '',
          NYDARR: [
            {
              DICID: '第一处',
              DICNAME: '第一处'
            },
            {
              DICID: '第二处',
              DICNAME: '第二处'
            },
            {
              DICID: '第三处',
              DICNAME: '第三处'
            },
            {
              DICID: '第四处',
              DICNAME: '第四处'
            },
            {
              DICID: '第五处',
              DICNAME: '第五处'
            }
          ]
        },
        {
          label: '是否属于无房户',
          key: 'SFSYWFH',
          buttonTest: '关联',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d',
          NYDARR: []
        },
        {
          label: '是否危房改造拆除重建',
          key: 'SFWFGZCCCJ',
          buttonTest: '关联',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d',
          NYDARR: []
        },
        {
          label: '原宅基地面积',
          key: 'YZJDMJ', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '原建筑面积',
          key: 'YZJMJ', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '现宅基地处置情况',
          key: 'XZJDCZQK',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: '2c478392-9c1b-40da-b941-41e4b8c9d6d3',
          NYDARR: []
        },
        {
          label: '权属证书号',
          key: 'QSZSH', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '',
          key: 'XCSJ1', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: false, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '房屋处置情况',
          key: 'FWCZQK',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: 'e69b7481-1f5e-4e81-a20c-87eb21c0dbf2',
          NYDARR: []
        }
      ],
      activeNames1: ['2'],
      content: [],
      Isshowbutton1: true,
      isShowCity: true,
      jianfangQK: [
        {
          label: '申请宅基地面积',
          key: 'sqzjdmj', //绑定的字段
          ISinput: true, //true:输入框
          required: false, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '地址',
          key: 'sqjfdz', //绑定的字段
          ISinput: true, //true:输入框
          required: false, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        }
      ],
      FJData1: [
      {
          title: '农村宅基地使用承诺书',
          FileName: [],
          isReadOnly: true,
          groupGuid: '0ee9b59f-4a90-4737-bc72-bded711ae918',
          fileList: []
        },
        {
          title: '村会议纪要、村公示照片',
          FileName: [],
          isReadOnly: true,
          groupGuid: '40cac790-2b4e-45a0-8717-ac4ee4f8d4aa',
          fileList: []
        },
        {
          title: '农户身份证',
          FileName: [],
          isReadOnly: true,
          groupGuid: '4d489c03-9c4b-45fe-acb3-3664a01fe40b',
          fileList: []
        },
        {
          title: '农户户口本',
          FileName: [],
          isReadOnly: true,
          groupGuid: 'd28c93b0-29de-4eb4-8fd0-4f57e0ee1ee6',
          fileList: []
        },
        {
          title: '农户社员资料',
          FileName: [],
          groupGuid: '6e49c106-5cfc-45f3-833e-fe41ecb4cc0d',
          fileList: []
        },
        {
          title: '土地证、不动产证、注销或调剂证明等证明材料',
          FileName: [],
          isReadOnly: true,
          groupGuid: 'ebca2003-8980-4398-91fc-bcc9db340e0a',
          fileList: []
        },
        {
          title: '独生子女证明材料(独生子女需提供)',
          FileName: [],
          groupGuid: 'a4027cf9-22bd-4e30-ae5e-624fb9e6266b',
          fileList: []
        },
        {
          title: '分家析产协议书（涉及分户的需提供）',
          FileName: [],
          groupGuid: '52d25f8c-aed2-416e-ad26-a5b857699a58',
          fileList: []
        },
        {
          title: '四邻意见书（涉及相邻关系的需提供，D级危房采取新建方式改造不需要提供）',
          FileName: [],
          groupGuid: '0a8a8ca1-ca83-4437-9dfe-ab365a2885fc',
          fileList: []
        },
        {
          title: '联建委托书',
          FileName: [],
          groupGuid: 'c9fd6bda-f89c-4463-bf36-1ca76422f811',
          fileList: []
        },
        {
          title: '其他材料',
          FileName: [],
          groupGuid: '44666177-b2af-4357-95ad-5d345e342316',
          fileList: []
        },
      ],
      xianZhaijiDi: [
        {
          label: '宅基地处数',
          key: 'ZJDCS',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: 'c17982d4-e6da-407c-981a-69557b2258bd',
          NYDARR: [
            // {
            //   DICID: '一处',
            //   DICNAME: '一处'
            // },
            // {
            //   DICID: '二处',
            //   DICNAME: '二处'
            // },
            // {
            //   DICID: '三处',
            //   DICNAME: '三处'
            // },
            // {
            //   DICID: '四处',
            //   DICNAME: '四处'
            // },
            // {
            //   DICID: '五处',
            //   DICNAME: '五处'
            // }
          ]
        },
        {
          label: '是否属于无房户',
          key: 'if_householder',
          ISinput: false,
          required: true,
          readonly: true,
          buttonTest: '关联',
          isTime: false,
          emitData: 'b6c020ad-16bb-4616-a77b-0d19609ed70d',
          NYDARR: []
        },
        {
          label: '是否危房改造拆除重建',
          key: 'if_Dilapidated',
          ISinput: false,
          required: true,
          buttonTest: '关联',
          readonly: true,
          isTime: false,
          emitData: 'b6c020ad-16bb-4616-a77b-0d19609ed70d',
          NYDARR: []
        },
        {
          label: '宅基地面积',
          key: 'ohomestead', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '建筑面积',
          key: 'oFloor_area', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '现宅基地处置情况',
          key: 'Disposetype',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: '2c478392-9c1b-40da-b941-41e4b8c9d6d3',
          NYDARR: []
        },
        {
          label: '房屋处置情况',
          key: 'FWCZQK',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: 'e69b7481-1f5e-4e81-a20c-87eb21c0dbf2',
          NYDARR: []
        },
        {
          label: '权属证书号',
          key: 'qxzsh', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '其他',
          key: 'Disposetype_qt', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '是否需要一次性告知书',
          key: 'IF_GZS',
          ISinput: false,
          required: false,
          readonly: true,
          isTime: false,
          emitData: '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d',
          NYDARR: []
        }
      ],
      contentDataCity: [
        {
          label: '所属市',
          key: 'CITY', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          NYDARR: []
        },
        {
          label: '所属县(区)',
          key: 'COUNTY', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          NYDARR: []
        },
        {
          label: '所属镇',
          key: 'TOWN', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          NYDARR: []
        },
        {
          label: '所属村',
          key: 'VILLAGE', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          NYDARR: []
        }
      ],
      isaddd: true,
      ROW_GUIDgg: '',
      contentData: [
        {
          label: '姓名',
          key: 'XM', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: false, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '身份证号',
          key: 'ID_CARD', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: false, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '联系电话',
          key: 'PHONE', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: false, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '性别',
          key: 'SEX',
          ISinput: false,
          required: true,
          readonly: false,
          isTime: false,
          emitData: 'a8e5782d-9a59-48e4-b35b-654b9bb667ca',
          NYDARR: []
        },
        {
          label: '年龄',
          key: 'AGE', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: false, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '户口所在地',
          key: 'DOMICILE', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '家庭住址',
          key: 'HOMEADDRESS', //绑定的字段
          ISinput: true, //true:输入框
          required: true, //true: 必填项
          readonly: true, //true:可以填写 false：不可以填写
          isTime: false //true:可以时间选择器 false：下拉框
        },
        {
          label: '申请理由',
          key: 'APPLICATION',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: '979dbb7c-d1f6-4074-a177-9ce25b0ad99e',
          NYDARR: []
        },
        {
          label: '是否属于变更',
          key: 'IF_ALTER',
          ISinput: false,
          required: true,
          readonly: true,
          isTime: false,
          emitData: '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d',
          NYDARR: []
        }
      ],
      showTable: false,
      rowData: {},
      DUIBI: [],
      DUIBI1: ['第二处', '第三处', '第四处', '第五处'],
      JFData: [
        {
          CITY: '',
          COUNTY: '',
          TOWN: '',
          VILLAGE: '',
          IF_LJ: '',
          IF_YCXGZS: '',
          XM: '',
          SEX: '',
          AGE: '',
          ID_CARD: '',
          DOMICILE: '',
          PHONE: '',
          HOMEADDRESS: '',
          APPLICATION: '',
          IF_ALTER: '',
          IF_HOUSEHOLDER: '',
          IF_DILAPIDATED: '',
          OHOMESTEAD: '',
          OFLOOR_AREA: '',
          DISPOSETYPE: '',
          DISPOSETYPE_QT: '',
          QXZSH: '',
          SQZJDMJ: '',
          SQJFDZ: '',
          CJTYJ: '',
          CJTQM: '',
          CJTSJ: '',
          CREATIONTIME: '',
          UPDATETIME: '',
          ISDELETE: '',
          XCGHXKZH: '',
          NCZJDPZSZH: '',
          JZGCSGXKZH: '',
          QXFZJG: '',
          HTQDRQ: '',
          HTJE: '',
          HTJZMJ: '',
          HTFWCG: '',
          TPYE: '',
          LSH: '',
          TSZT: '',
          TASK_CAUTIONLIGHT: '',
          TASK_COUNTDOWN: '',
          PROC_NAME: '',
          SYHJ_NAME: '',
          NODE_NAME: '',
          BIZTYPE_GUID: '',
          BIZTYPE_ID: '',
          ZJDCS:'',
          DATA_GUID: '',
          DATAVIEW_GUID: '',
          ENTITYROWGUID: '',
          PROC_BEGINTIME: '',
          PROC_CAUTIONLIGHT: '',
          PROC_CONDITOINLIST: '',
          PROC_CREATEDATE: '',
          PROC_CREATORID: '',
          PROC_DESC: '',
          PROC_ENDTIME: '',
          PROC_EXECUTORLIST: '',
          PROC_EXTPROPERTY: '',
          PROC_GUID: '',
          PROC_HISTORYVERSION: '',
          PROC_ID: '',
          PROC_MAINTASKID: '',
          PROC_PLANENDTIME: '',
          PROC_REMAINTIME: '',
          PROC_RESERVED: '',
          PROC_STATUS: '',
          PROC_URGED: '',
          WF_GUID: '',
          WF_ID: '',
          WF_NAME: '',
          BELONGSBUSINESS: '',
          ACT_ID: '',
          ENTITY_ID: '',
          LASTMODIFYDATE: '',
          ND_ID: '',
          NODE_GUID: '',
          TASK_AGENT: '',
          TASK_AGENTID: '',
          TASK_AUDITDATE: '',
          TASK_AUDITORID: '',
          TASK_BEGINTIME: '',
          TASK_CONSIGNID: '',
          TASK_DELAYTIME: '',
          TASK_DESC: '',
          TASK_DISPATCHDATE: '',
          TASK_DISPATCHERID: '',
          TASK_DISPATCHTYPE: '',
          TASK_ENDTIME: '',
          TASK_EXECUTORID: '',
          TASK_FLOBOTNAME: '',
          TASK_GUID: '',
          TASK_ID: '',
          TASK_LIMITTIME: '',
          TASK_NAME: '',
          TASK_OVERDUETIME: '',
          TASK_PLANENDTIME: '',
          TASK_PRIORITY: '',
          TASK_RATE: '',
          TASK_RECIEVEDATE: '',
          TASK_RECIPIENTID: '',
          TASK_RECIPIENTLIST: '',
          TASK_REMAINTIME: '',
          TASK_SENDDESC: '',
          TASK_SOURCE: '',
          TASK_SUBPROCID: '',
          TASK_TYPE: '',
          TASK_URGED: '',
          DELFROM_STATUS: '',
          TASK_ACROSSAPPLYID: '',
          ISDELETE_STATUSNAME: ''
        }
      ],
      isXIUGAI: false,
      JZCSData: [],
      show11Data: [],
      ROW_GUIDS: ''
    }
  },
  methods: {
    //关联按钮
    getButton1(name, val, key) {
      console.log(name, val, key, '点击按钮')
      if (val != '是否需要一次性告知书') {
        if (name == '否') {
          this.$toast.fail('不可关联')
        } else if (name == '是') {
          if (this.WGData.length == 0) {
            this.$toast.fail('暂无数据')
          } else {
            //打开弹窗
            this.showTable = true
          }
        }
      } else {
        this.isshowsss = true
      }
    },
    //获取关联数据
    async getWGGLData() {
      const res = await getApplyPersonInfoByIdCard('430528199906118211')
      this.WGData = res.data.data
      console.log(this.WGData, '关联数据')
    },
    clickButton(data) {
      this.show11 = true
      this.show11Data = []
      this.JZCSData.forEach((item) => {
        if (data == item.ZJDCS) {
          this.show11Data.push(item)
        }
      })
      // this.show11Data[0] = data
      console.log(this.show11Data, 'efnieuf')
      this.show11Title = data
      if (this.show11Data.length == 0) {
        this.show11Data.push({
          ROW_GUID: '',
          TO_ROW_GUID: '',
          PKID: '',
          SFSYWFH: '',
          SFWFGZCCCJ: '',
          YZJDMJ: '',
          YZJMJ: '',
          XZJDCZQK: '',
          FWCZQK: '',
          QSZSH: '',
          WFHGLM: null,
          WGGLM: null,
          XZJDCZQKQT: null,
          DQHJ: '村级预审',
          ZJDCS: data
        })
      }
    },
    isStringEmpty(str) {
      return str.trim() === ''
    },
    //打开弹窗
    handleSelect() {
      let index = 0
      this.$children.forEach(item=>{
        if(!item.bitian) return
        console.log(item)
        index += item.bitian()
        console.log(index)
      })
      if(index>0||!this.JFData[0].CJTYJ){
        this.$toast.fail('请填写必填项')
      } else{
        this.saveData()
        this.isshow111 = true
      }
      // this.isshow111 = true
    },
    getValues(name, value, label) {
      console.log(name, value, label, this.JFData)
      //根据选择的处数新增按钮 需要跟句this.JZCSData的大小来控制
      if (label == '宅基地处数' && name != '一处') {
        let num = 0
        let numX = 0
        this.DUIBI1.forEach((item, index) => {
          //   if (item == this.JZCSData[this.JZCSData.length - 1].ZJDCS) {
          //     //当前
          //     num = index
          //   }
          if (item.substring(1) == name) {
            numX = index
          }
        })

        this.DUIBI = []
        this.DUIBI1.forEach((item, index) => {
          if (index <= numX) {
            this.DUIBI.push(item)
          }
        })
      } else if (label == '宅基地处数' && name == '一处') {
        this.DUIBI = []
      }
      if (label == '是否需要一次性告知书' && name == '是') {
        this.isshowsss = true
      } else if (label == '是否需要一次性告知书' && name == '否') {
        this.isshowsss = false
      }
    },
    /**
     * 获取村预审数据
     */
    async getDangHangData() {
      let data = [{ field: 'TO_ROW_GUID', value: this.rowData.ROW_GUID }]
      const res = await GSA_Search('931c475d-c6f3-41c0-8aef-28e20922db97', data)
      if (res.Data.length > 0) {
        this.ROW_GUIDS = res.Data[0].ROW_GUID
        this.JFData = res.Data
        this.isXIUGAI = false
        let data1 = [
          { field: 'TO_ROW_GUID', value: res.Data[0].ROW_GUID },
          { field: 'dqhj', value: '村级预审' }
        ]
        const res1 = await GSA_Search('21697fcc-1b1b-4c64-a478-e92cc77aa185', data1)
        this.JZCSData = res1.Data
        console.log(this.JZCSData, 'nbuibuijbujibuibuikthis.JZCSData')
        this.DUIBI = []
        this.DUIBI1.forEach((item, index) => {
          if (index <= this.JZCSData.length - 1) {
            this.DUIBI.push(item)
          }
        })
        console.log(this.JFData[0].ZJDCS, 'this.JZCSData')
        // }
      } else {
        this.JFData = []
        this.isXIUGAI = true
        this.JFData.push(this.rowData)
      }
      // this.JFData = res.Data
      setTimeout(() => {
        this.getIF_GZS()
      }, 1000)
      console.log(this.JFData[0]['IF_GZS'], 'this.JFData[0]')
    },
    async getIF_GZS() {
      let data = [{ field: 'TO_ROW_GUID', value: this.rowData.ROW_GUID }]
      const res = await GSA_Search('4dffb55c-bd9e-4477-98ba-6e28c4e4d697', data)
      if (res.Data.length > 0) {
        this.ROW_GUIDgg = res.Data[0].ROW_GUID
        // this.JFData[0]['IF_GZS'] = res.Data[0].IF_GZS
        this.$set(this.JFData[0], 'IF_GZS', res.Data[0].IF_GZS)
        if (this.JFData[0].IF_GZS == 5) {
          this.isshowsss = true
        }
        this.isaddd = false
      }
    },
    // async getDangHangData(){
    //     this.rowData = JSON.parse(this.$route.query.data)
    //     console.log(this.rowData.ROW_GUID)
    //     let data = [{ "field": "TO_ROW_GUID", "value": this.rowData.ROW_GUID}]
    //     const res = await GSA_Search('931c475d-c6f3-41c0-8aef-28e20922db97', data)
    //     this.JFData = res.Data
    // },
    async saveData() {
      this.JFData.forEach((item) => {
        delete item.PKID
      })
      const date = await GSA_Add('931c475d-c6f3-41c0-8aef-28e20922db97', this.isXIUGAI, ...this.JFData)
      this.saveIF_GZS()
    },
    //关闭弹窗
    handleSelectClose() {
      this.isshow111 = false
    },
    //保存一次性报告书
    async saveIF_GZS() {
      let data = {}
      data.TO_ROW_GUID = this.rowData.ROW_GUID
      data.IF_GZS = this.JFData[0].IF_GZS
      if (this.isaddd) {
        data.ROW_GUID = uuidv4()
      } else {
        data.ROW_GUID = this.ROW_GUIDgg
      }
      const res = await GSA_Add('4dffb55c-bd9e-4477-98ba-6e28c4e4d697', this.isaddd, data)
    },
    //保存新增的宅基地处数
    async saveDataTable() {
      let isedit = true
      let data = this.show11Data
      console.log(data)
      if (!data[0].ROW_GUID) {
        let uuid1 = uuidv4()
        data[0].TO_ROW_GUID = this.ROW_GUIDS
        data[0].ROW_GUID = uuid1
        data[0].eca_RowState = 'added'
        delete data[0].PKID
        isedit = true
      } else {
        data[0].eca_RowState = 'modified'
        isedit = false
      }
      const date = await GSA_Add('21697fcc-1b1b-4c64-a478-e92cc77aa185', isedit, ...data)
    }
  },
  mounted() {},
  created() {
    this.JFData = []
    this.rowData = JSON.parse(this.$route.query.data)
    this.JFData.push(this.rowData)
    this.getDangHangData()
  },
  components: {
    bigData,
    inputContatiner,
    inputSelect,
    upLoad,
    tableAdd
  }
}
</script>

<style lang="scss" scoped>
.ceshi {
  height: 100vh;

  .CUNYUSHEN {
    height: 93vh;
    padding: 4px;
    overflow: auto;
  }

  .footer {
    height: 6vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  .subTitle {
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #9b9b9b;
    font-weight: bold;
    padding-left: 14px;

    .line {
      width: 6px;
      height: 26px;
      background: #3f8ffc;
      display: inline-block;
      margin-right: 10px;
    }
  }
}
</style>

<style>
.van-cell {
  color: black;
  font-weight: bold !important;
}

.van-collapse-item__content {
  color: black;
  padding: 0 6px !important;
}
</style>
